<%--
  Created by IntelliJ IDEA.
  User: Dominic
  Date: 06.04.12
  Time: 23:08
  To change this template use File | Settings | File Templates.
--%>

<%@ page contentType="text/html;charset=UTF-8" %>
<html>
<head>
  <title>Forum Board</title>
   <link rel="stylesheet" href="${resource(dir: 'css', file: 'forum.css')}" type="text/css">
   <script type="text/javascript" src="${resource(dir:'js',file:'showhidearguments.js')}"></script>
</head>
<body>
  <div id="forum-logo" role="banner">
      <img src="${resource(dir:"images",file:"forumlogo.png")}" alt="Forum Logo" height="100" width="200">
  </div>
  <div>
   <h1>Available Courses: </h1>
      <g:set var="counter" value="${1}" />
      <g:each in="${courses}" var="course" >
           <div class="course-container">
               <div class="course-name"    ><h2>${course.name}</h2></div>
              <div class="display-arguments"><a  id="imgDiv${counter}" href="javascript:toggle('argumentsDiv${counter}','imgDiv${counter}');">
                   <img src="${resource(dir:"images",file:"show.png")}" alt="show" width="20" height="20">
               </a></div>

          </div>
          <div class="arguments-div" id="argumentsDiv${counter}"style="display:none">
              <g:set var="counter" value="${counter + 1}" />
              <g:each in="${course.arguments}" var="argument">
                  <li><g:link controller="argument" id="${argument.id}">${argument.name}</g:link></li>
              </g:each>
              <g:link action="shownewargumentform" id="${course.id}">Create Argument</g:link>
          </div>
      </g:each>
  </div>
</body>
</html>
